﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVVMLesson01.MVVM
{
    /// <summary>
    /// 针对功能需求的数据模型
    /// </summary>
    public class DataModel //: INotifyPropertyChanged
    {
		private double value1;

		public double Value1
		{
			get { return value1; }
			set { value1 = value; }
		}
		
		private double value2;

		public double Value2
		{
			get { return value2; }
			set { value2 = value; }
		}
		
		private double value3;

        public double Value3
		{
			get 
			{ 
				return value3;
			}
			set 
			{ 
				value3 = value;
				//if (PropertyChanged != null)
				{
					// 在系统内广而告之，告诉页面上哪个对象关注了这个实例里的这个属性的，赶紧更新结果
					//PropertyChanged(this, new PropertyChangedEventArgs("Value3"));
				}
			}
		}

        /// <summary>
        /// 做信息发布的对象，需要执行一个这个对象
        /// </summary>
       // public event PropertyChangedEventHandler? PropertyChanged;
    }
}
